﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Entities
{
    public class Direction : BaseEntity<int>
    {
        public Direction()
        {
            StudyPlanItems = new List<StudyPlanItem>();
            Groups = new List<Group>();
        }

        public virtual string DirectionTitle { get; set; }
        public virtual decimal Code { get; set; }
        public virtual IList<StudyPlanItem> StudyPlanItems { get; set; }
        public virtual IList<Group> Groups { get; set; }

        public virtual void AddPlanItem(StudyPlanItem PlanItem)
        {
            PlanItem.Direction = this;
            StudyPlanItems.Add(PlanItem);
        }

        public virtual void AddGroup(Group group)
        {
            group.Direction = this;
            Groups.Add(group);
        }
    }
}